home *** CD-ROM | disk | FTP | other *** search
/ MacPeople 1998 #2 / MACPEOPLE-1998-NO2.ISO / アップル関連 / ARA PS アップデート / モデム用追加分 / RATOC REX-5567A⁄9867A / RATOC REX-5567A_9867A next >
Text File  |  1995-08-08  |  11KB  |  538 lines

  1. !**************************************************************************
  2. !
  3. ! "RATOC REX-5567/9867  for  ARA version 2.0  CCL - Aug./08/95"
  4. !
  5. !    REX-5567/9867..
  6. !      DATA/FAX Modem     DATA 14400bps/ FAX 14400bps
  7. !      Data mode V.32bis/V.32/V.22bis/V.22/V.21/BELL 212A/BELL 103
  8. !      Fax mode V.17/V.29/V.27ter/V.21/V.21ch2   EIA-578 Class1/EIA-592 Class2
  9. !      ERR MNP Class4 V.42/ DATA MNP Class5 V.42bis
  10. !      DTE Speed 57600/38400/19200/9600/7200/4800/2400/1200/300bps
  11. !
  12. ! "localized for RATOC System inc. - Aug./08/95"
  13. !
  14. !               Written by Chell.Para
  15. !
  16. !  'mlts' resource info for this modem:
  17. !    byte 1 == 01 -> modem HAS builtin reliability protocols
  18. !    byte 2 == 00 -> reserved by Apple
  19. !    byte 3 == FE -> max hex chars in varstr 7 (254 dec)
  20. !    byte 4 == FE -> max hex chars in varstr 8
  21. !    byte 5 == FE -> max hex chars in varstr 9
  22. !    
  23. !**************************************************************************
  24. @ORIGINATE
  25. @ANSWER
  26. !******************************************
  27. ! モデムの初期設定 ラベル1〜10
  28. !******************************************
  29. ! Mac talks to the modem at 19,200 bps.  
  30. serreset 19200, 0, 8, 1
  31. !------------------------
  32. ! シリアルポートリセット
  33. !------------------------
  34. HSReset 0 0 0 0 0 0
  35. !
  36. settries 0
  37. @LABEL 1
  38. matchclr
  39. matchstr 1 3 "OK¥13¥10"
  40. ! &F  - モデム動作状態のSレジスタと各コマンドを出荷時モードに設定
  41. ! &D3 - ERがONからOFF に変化すると電源投入時と同じ初期設定を行う
  42. ! ¥Q3 - CS/RSによる双方向のフロー制御
  43. ! %E0 - 自動リトレーニング禁止
  44. ! %C0 - データコンプレッション無し
  45. ! ¥V2 - MNP/LAPMモード時に詳細な結果コードを使用する
  46. ! ¥N1 - ノーマルモード指定
  47. ! S0=0 - 自動応答をしない
  48. ! E0   - コマンドエコー禁止
  49. write "AT&F&D3¥¥Q3%E0%C0¥¥V2¥¥N1E0¥13"
  50. matchread 30
  51. inctries
  52. iftries 2 81
  53. !------------------
  54. ! モデムリセット
  55. !-------------------
  56. DTRSet
  57. pause 5
  58. DTRClear
  59. pause 5
  60. DTRSet
  61. flush
  62. jump 1
  63. !
  64. !-----------------------------------------
  65. ! MNP/LAPMエラー訂正プロトコルチェック
  66. !-----------------------------------------
  67. @LABEL 3
  68. ! MNP/LAPMを指定されれば(var 4 == 1)ラベル5
  69. ifstr 4 5 "1"
  70. !
  71. ! MNP/LAPMを使わない場合(var 4 == 0)[ARA 1.0]ラベル9
  72. ifstr 4 9 "0"
  73. !
  74. ! それ以外のvar 4値はエラー
  75. jump 86
  76. !
  77. !-----------------------------------------------------
  78. ! LAPM/MNPモード
  79. !-----------------------------------------------------
  80. @LABEL 5
  81. matchclr
  82. matchstr 1 9 "OK¥13¥10"
  83. ! ¥N3 - v42自動選択モード
  84. write "AT¥¥N3¥13"
  85. matchread 300
  86. jump 81
  87. !
  88. !----------------------------------------
  89. ! スピーカーOFF動作/ON指定ならラベル13
  90. !----------------------------------------
  91. @LABEL 9
  92. ifstr 2 13 "1"
  93. pause 5
  94. matchclr
  95. matchstr 1 13 "OK¥13¥10"
  96. write "ATM0¥13"
  97. matchread 30
  98. jump 81
  99. !
  100. !*******************************************************************************
  101. ! モデムの初期設定後オリジネートモード・アンサーモードでの応答 ラベル11〜30
  102. !*******************************************************************************
  103. @LABEL 13
  104. pause 5
  105. ifANSWER 71
  106. !
  107. ! 通常ダイアルであれば(parm 6 == 0)ラベル19
  108. ifstr 6 19 "0"
  109. !
  110. ! ダイアルトーン無視であれば(parm 6 == 1)ラベル17
  111. ifstr 6 17 "1"
  112. !
  113. ! ビジートーン・ダイアルトーン無視であれば(parm 6 == 2)ラベル15
  114. ifstr 6 15 "2"
  115. !
  116. !  それ以外のparm 6値はエラー
  117. jump 86
  118. !
  119. @label 15
  120. note "手動ダイアル中。" 3
  121. ! X1 - ビジートーン・ダイアルトーン無視
  122. ! D   - ダイアルコマンド
  123. write "ATX1D¥13"
  124. jump 32
  125. !
  126. @label 17
  127. note "ダイアルトーンを無視してダイアル中。" 3
  128. matchclr
  129. matchstr 1 19 "OK¥13¥10"
  130. ! X3 - ダイアルトーン無視
  131. write "ATX3¥13"
  132. matchread 30
  133. jump 81
  134. !
  135. @label 19
  136. ! parm 1 = ダイアルストリングドキュメント
  137. ! parm 3 = パルス"P"/トーン"T"
  138. ! parm 7 = 最初のダイアルストリング
  139. ! parm 8 = 二番目のダイアルストリング
  140. ! parm 9 = 最後のダイアルストリング
  141. note "^1 をダイアル中。" 3
  142. !
  143. ! parm 8が無い場合(出力parm 7)ラベル27
  144. ifstr 8 27 " "
  145. !
  146. ! parm 9が無い場合(出力parm 7.8)ラベル24
  147. ifstr 9 24 " "
  148. !
  149. ! それ以外は出力parm 7.8.9
  150. matchclr
  151. matchstr 1 21 "OK¥13¥10"
  152. write "ATD^3^7;¥13"
  153. matchread 400
  154. ! モデム応答がない場合エラー
  155. jump 81
  156. !
  157. @label 21
  158. matchclr
  159. matchstr 1 22 "OK¥13¥10"
  160. write "ATD^3^8;¥13"
  161. matchread 400
  162. ! モデム応答がない場合エラー
  163. jump 81
  164. !
  165. @label 22
  166. write "ATD^3^9¥13"
  167. jump 32
  168. !
  169. @label 24
  170. matchclr
  171. matchstr 1 25 "OK¥13¥10"
  172. write "ATD^3^7;¥13"
  173. matchread 400
  174. ! モデム応答がない場合エラー
  175. jump 81
  176. !
  177. @label 25
  178. write "ATD^3^8¥13"
  179. jump 32
  180. !
  181. @label 27
  182. write "ATD^3^7¥13"
  183. jump 32
  184. !****************************
  185. ! モデム接続 ラベル34〜60
  186. !****************************
  187. @LABEL 32
  188. matchclr
  189. !
  190. matchstr 1  35 "CONNECT 1200/REL¥13¥10"
  191. matchstr 2  35 "CONNECT 1200/REL4¥13¥10"
  192. matchstr 3  35 "CONNECT 1200/REL5¥13¥10"
  193. matchstr 4  36 "CONNECT 1200/V.42bis¥13¥10"
  194. matchstr 5  37 "CONNECT 1200/LAPM¥13¥10"
  195. !
  196. matchstr 6  38 "CONNECT 2400¥13¥10"
  197. matchstr 7  39 "CONNECT 2400/REL¥13¥10"
  198. matchstr 8  39 "CONNECT 2400/REL4¥13¥10"
  199. matchstr 9  39 "CONNECT 2400/REL5¥13¥10"
  200. matchstr 10 40 "CONNECT 2400/V.42bis¥13¥10"
  201. matchstr 11 41 "CONNECT 2400/LAPM¥13¥10"
  202. !
  203. matchstr 12 42 "CONNECT 4800¥13¥10"
  204. matchstr 13 43 "CONNECT 4800/REL¥13¥10"
  205. matchstr 14 43 "CONNECT 4800/REL4¥13¥10"
  206. matchstr 15 43 "CONNECT 4800/REL5¥13¥10"
  207. matchstr 16 44 "CONNECT 4800/V.42bis¥13¥10"
  208. matchstr 17 45 "CONNECT 4800/LAPM¥13¥10"
  209. !
  210. matchstr 18 46 "CONNECT 7200¥13¥10"
  211. matchstr 19 47 "CONNECT 7200/REL¥13¥10"
  212. matchstr 20 47 "CONNECT 7200/REL4¥13¥10"
  213. matchstr 21 47 "CONNECT 7200/REL5¥13¥10"
  214. matchstr 22 48 "CONNECT 7200/V.42bis¥13¥10"
  215. matchstr 23 49 "CONNECT 7200/LAPM¥13¥10"
  216. !
  217. matchstr 24 50 "CONNECT 9600¥13¥10"
  218. matchstr 25 51 "CONNECT 9600/REL¥13¥10"
  219. matchstr 26 51 "CONNECT 9600/REL4¥13¥10"
  220. matchstr 27 51 "CONNECT 9600/REL4¥13¥10"
  221. matchstr 28 52 "CONNECT 9600/V.42bis¥13¥10"
  222. matchstr 29 53 "CONNECT 9600/LAPM¥13¥10"
  223. !
  224. matchstr 30 54 "CONNECT 12000¥13¥10"
  225. matchstr 31 55 "CONNECT 12000/REL¥13¥10"
  226. matchstr 32 55 "CONNECT 12000/REL4¥13¥10"
  227. matchstr 33 55 "CONNECT 12000/REL5¥13¥10"
  228. matchstr 34 56 "CONNECT 12000/V.42bis¥13¥10"
  229. matchstr 35 57 "CONNECT 12000/LAPM¥13¥10"
  230. !
  231. matchstr 36 58 "CONNECT 14400¥13¥10"
  232. matchstr 37 59 "CONNECT 14400/REL¥13¥10"
  233. matchstr 38 59 "CONNECT 14400/REL4¥13¥10"
  234. matchstr 39 59 "CONNECT 14400/REL5¥13¥10"
  235. matchstr 40 60 "CONNECT 14400/V.42bis¥13¥10"
  236. matchstr 41 61 "CONNECT 14400/LAPM¥13¥10"
  237. !
  238. ! other connect speeds go below here
  239. !
  240. matchstr 42 72 "RING¥13¥10"
  241. matchstr 43 82 "NO DIALTONE¥13¥10"
  242. matchstr 44 83 "NO CARRIER¥13¥10"
  243. matchstr 45 83 "ERROR¥13¥10"
  244. matchstr 46 84 "BUSY¥13¥10"
  245. matchstr 47 85 "NO ANSWER¥13¥10"
  246. matchstr 48 87 "CONNECT¥13¥10"
  247. !
  248. matchread 700
  249. ifANSWER 32
  250. jump 81
  251. !
  252. @LABEL 35
  253. note "MNP リンクが成立。" 3
  254. userhook 2
  255. note "1200 bps で接続中" 2
  256. CommunicatingAt 1200
  257. jump 68
  258. !
  259. @LABEL 36
  260. note "V.42bis リンクが成立。" 3
  261. userhook 2
  262. note "1200 bps で接続中" 2
  263. CommunicatingAt 1200
  264. jump 68
  265. !
  266. @LABEL 37
  267. note "LAP-M リンクが成立。" 3
  268. userhook 2
  269. note "1200 bps で接続中" 2
  270. CommunicatingAt 1200
  271. jump 68
  272. !
  273. !
  274. !
  275. @LABEL 38
  276. note "2400 bps で接続中" 2
  277. serreset 2400, 0, 8, 1
  278. jump 68
  279. !
  280. @LABEL 39
  281. note "MNP リンクが成立。" 3
  282. userhook 2
  283. note "2400 bps で接続中" 2
  284. CommunicatingAt 2400
  285. jump 68
  286. !
  287. @LABEL 40
  288. note "V.42bis リンクが成立。" 3
  289. userhook 2
  290. note "2400 bps で接続中" 2
  291. CommunicatingAt 2400
  292. jump 68
  293. !
  294. @LABEL 41
  295. note "LAP-M リンクが成立。" 3
  296. userhook 2
  297. note "2400 bps で接続中" 2
  298. CommunicatingAt 2400
  299. jump 68
  300. !
  301. @LABEL 42
  302. note "4800 bps で接続中" 2
  303. serreset 4800, 0, 8, 1
  304. jump 68
  305. !
  306. @LABEL 43
  307. note "MNP リンクが成立。" 3
  308. userhook 2
  309. note "4800 bps で接続中" 2
  310. CommunicatingAt 4800
  311. jump 68
  312. !
  313. @LABEL 44
  314. note "V.42bis リンクが成立。" 3
  315. userhook 2
  316. note "4800 bps で接続中" 2
  317. CommunicatingAt 4800
  318. jump 68
  319. !
  320. @LABEL 45
  321. note "LAP-M リンクが成立。" 3
  322. userhook 2
  323. note "4800 bps で接続中" 2
  324. CommunicatingAt 4800
  325. jump 68
  326. !
  327. @LABEL 46
  328. note "7200 bps で接続中" 2
  329. serreset 7200, 0, 8, 1
  330. jump 68
  331. !
  332. @LABEL 47
  333. note "MNP リンクが成立。" 3
  334. userhook 2
  335. note "7200 bps で接続中" 2
  336. CommunicatingAt 7200
  337. jump 68
  338. !
  339. @LABEL 48
  340. note "V.42bis リンクが成立。" 3
  341. userhook 2
  342. note "7200 bps で接続中" 2
  343. CommunicatingAt 7200
  344. jump 68
  345. !
  346. @LABEL 49
  347. note "LAP-M リンクが成立。" 3
  348. userhook 2
  349. note "7200 bps で接続中" 2
  350. CommunicatingAt 7200
  351. jump 68
  352. !
  353. @LABEL 50
  354. note "9600 bps で接続中" 2
  355. serreset 9600, 0, 8, 1
  356. jump 68
  357. !
  358. @LABEL 51
  359. note "MNP リンクが成立。" 3
  360. userhook 2
  361. note "9600 bps で接続中" 2
  362. CommunicatingAt 9600
  363. jump 68
  364. !
  365. @LABEL 52
  366. note "V.42bis リンクが成立。" 3
  367. userhook 2
  368. note "9600 bps で接続中" 2
  369. CommunicatingAt 9600
  370. jump 68
  371. !
  372. @LABEL 53
  373. note "LAP-M リンクが成立。" 3
  374. userhook 2
  375. note "9600 bps で接続中" 2
  376. CommunicatingAt 9600
  377. jump 68
  378. !
  379. @LABEL 54
  380. note "12 kbps で接続中" 2
  381. serreset 12000, 0, 8, 1
  382. jump 68
  383. !
  384. @LABEL 55
  385. note "MNP リンクが成立。" 3
  386. userhook 2
  387. note "12 kbps で接続中" 2
  388. CommunicatingAt 12000
  389. jump 68
  390. !
  391. @LABEL 56
  392. note "V.42bis リンクが成立。" 3
  393. userhook 2
  394. note "12 kbps で接続中" 2
  395. CommunicatingAt 12000
  396. jump 68
  397. !
  398. @LABEL 57
  399. note "LAP-M リンクが成立。" 3
  400. userhook 2
  401. note "12 kbps で接続中" 2
  402. CommunicatingAt 12000
  403. jump 68
  404. !
  405. @LABEL 58
  406. note "14.4 kbps で接続中" 2
  407. serreset 14400, 0, 8, 1
  408. jump 68
  409. !
  410. @LABEL 59
  411. note "MNP リンクが成立。" 3
  412. userhook 2
  413. note "14.4 kbps で接続中" 2
  414. CommunicatingAt 14400
  415. jump 68
  416. !
  417. @LABEL 60
  418. note "V.42bis リンクが成立。" 3
  419. userhook 2
  420. note "14.4 kbps で接続中" 2
  421. CommunicatingAt 14400
  422. jump 68
  423. !
  424. @LABEL 61
  425. note "LAP-M リンクが成立。" 3
  426. userhook 2
  427. note "14.4 kbps で接続中" 2
  428. CommunicatingAt 14400
  429. jump 68
  430. !
  431. @LABEL 68
  432. ! turn on cts handshaking.
  433. HSReset 0 1 0 0 0 0
  434. !
  435. ifANSWER 69
  436. pause 30
  437. @LABEL 69
  438. exit 0
  439. !*********************************************
  440. ! モデム返答一回 ラベル71〜80
  441. !*********************************************
  442. @LABEL 71
  443. matchclr
  444. matchstr 1 32 "OK¥13¥10"
  445. write "ATS0=1¥13"
  446. matchread 30
  447. jump 81
  448. !
  449. @LABEL 72
  450. ifORIGINATE 32
  451. ! claim the serial port
  452. userhook 1
  453. note "電話に応対しています。" 2
  454. jump 32
  455. !************************************************
  456. ! エラーメッセージ ラベル81〜100
  457. !************************************************
  458. ! モデムが応答しない
  459. @LABEL 81
  460. exit -6019
  461. !
  462. ! ダイアルトーン未検出
  463. @LABEL 82
  464. exit -6020
  465. !
  466. ! モデムと接続できない
  467. @LABEL 83
  468. exit -6021
  469. !
  470. ! ビジートーン検出
  471. @LABEL 84
  472. exit -6022
  473. !
  474. ! 指定番号の返答がない
  475. @LABEL 85
  476. exit -6023
  477. !
  478. ! 機能拡張ファイルの破損
  479. @LABEL 86
  480. exit -6027
  481. !
  482. ! 300bps未対応
  483. @LABEL 87
  484. exit -6002 "ARA は 300bps の接続に対応していません。"
  485. ! -6002 "ARA doesn't support 300bps connection."
  486. !
  487. !**************************
  488. ! ハングアップ 101〜120
  489. !**************************
  490. @HANGUP
  491. @LABEL 102
  492. settries 0
  493. HSReset 0 0 0 0 0 0
  494. !----------------------------
  495. ! コマンドモードに戻す
  496. !----------------------------
  497. @LABEL 105
  498. matchclr
  499. matchstr 1 108 "OK¥13¥10"
  500. pause 10
  501. write "+++"
  502. matchread 15
  503. !
  504. !-------------------
  505. ! オフフック
  506. !-------------------
  507. @LABEL 108
  508. matchclr
  509. matchstr 1 111 "NO CARRIER¥13¥10"
  510. matchstr 2 111 "OK¥13¥10"
  511. matchstr 3 111 "ERROR¥13¥10"
  512. write "ATH¥13"
  513. matchread 30
  514. inctries
  515. iftries 3 81
  516. !---------------------------------------
  517. ! DTR初期化コマンド
  518. !---------------------------------------
  519. DTRSet
  520. pause 5
  521. DTRClear
  522. pause 5
  523. DTRSet
  524. flush
  525. jump 105
  526. !------------------------------
  527. ! 初期設定値に戻す.
  528. !------------------------------
  529. @LABEL 111
  530. pause 15
  531. matchclr
  532. matchstr 1 114 "OK¥13¥10"
  533. write "AT&FS0=0¥13"
  534. matchread 30
  535. jump 81
  536. !
  537. @LABEL 114
  538. exit 0